﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using TongTongMall.Dependecy;
using TongTongMall.MallWeb.Core.IApiRepositories;


namespace TongTongMall.MallWeb.Core.Test
{
    class Program
    {
        static void Main(string[] args)
        {
            new MallWebService();
            IocManager.Instance.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
            IApiSendMessageReposiory _apiSendMessageReposiory = IocManager.Instance.Resolve<IApiSendMessageReposiory>();
           var s= _apiSendMessageReposiory.SendMessageAsync(new SupportDomain.Models.SendMessageValueObject {


            }).Result;
            //new QueryPayStatusJob();
            //var _IMessageDomainService = IocManager.Instance.Resolve<IMessageDomainService>();
            //var message = new NoticeToPayOrderMessage
            //{
            //    OrderSettlementId = Guid.NewGuid(),
            //    TenantID = Guid.NewGuid(),
            //    UserID = Guid.NewGuid(),
            //    Alias = "asdf",
            //    AliasType = "main"
            //};
            //var result = _IMessageDomainService.AddOrderPayWaitPushMessage(new List<NoticeToPayOrderMessage>() {
            //   message
            //}, DateTime.Now);

            //var result2 = _IMessageDomainService.RemoveOrderPayWaitPushMessage(new NoticeToPayOrderMessagePrefix
            //{
            //    OrderSettlementId = message.OrderSettlementId,
            //    TenantID = message.TenantID,
            //    UserID = message.UserID
            //});

            //var result2 = _IMessageDomainService.RemoveOrderPayWaitPushMessage(new NoticeToPayOrderMessagePrefix
            //{
            //    OrderSettlementId = Guid.Parse("816d6e1f-1576-4f7b-b02a-b93489b223c1"),
            //    TenantID = Guid.Parse("a1da3808-0434-405f-95a8-ac763c79368b"),
            //    UserID = Guid.Parse("367088e3-2435-471f-8251-2123171b3d10")
            //});


            //var _MessageQueue = IocManager.Instance.Resolve<INoticeToPayOrderMessageManage>();
            //_MessageQueue.Removes(new NoticeToPayOrderMessage[] { new NoticeToPayOrderMessage {
            //    OrderSettlementId = Guid.Parse("6b6d48be-5fba-49e2-be49-cf8a8759db39"),
            //    TenantID = Guid.Parse("f468c04f-fadf-41c6-956c-4927e8eac549"),
            //    UserID = Guid.Parse("9de00098-3807-4066-8dba-4aca3360494b"),
            //    Alias="asdf",
            //    AliasType="main"
            //} });
        }
    }
}
